package org.example.springaop.aspect;

import lombok.extern.slf4j.Slf4j;
import org.aspectj.lang.ProceedingJoinPoint;
import org.aspectj.lang.annotation.Around;
import org.aspectj.lang.annotation.Aspect;
import org.springframework.stereotype.Component;

//@Aspect
//@Slf4j
//@Component
//public class TimeRecordAspect {
//    @Around("execution(* org.example.springaop.controller.*.*(..))")
//    public Object getTime(ProceedingJoinPoint joinPoint){
//       log.info("方法执行前: Around方法");
//       Object result = null ;
//       try{
//         result =  joinPoint.proceed();
//       } catch (Throwable e) {
//          log.error(joinPoint.toShortString()+"出现异常"+e);
//       }
//        log.info("方法执行后: Around方法");
//       return result ;
//    }
//}
